:
# DEFINE _ intsizeof (N) (sizeof (n) + sizeof (INT)-1 )~ (Sizeof (INT)-1 ))
This macro is used to calculate the size of a given variable or Type N after its byte alignment by integer length ). In a 32-bit SystemInt occupies 4 bytes and 16-bit Systems occupies 2 bytes.Expression(Sizeof (n) + sizeof (INT)-1)If sizeof (n) is smaller than sizeof (INT ),The result value of is one to the left of the binary value of sizeof (n.For example, sizeof (short) + sizeof (N)-1 = 5The binary value of 5 is
bytes.
The other three functions are actually just three macro definitions, wait a minute, let's look at the macro definition _intsizeof in the middle:
#define _INTSIZEOF (N) (sizeof (n) + sizeof (int)-1) ~ (sizeof (int)-1))
The function of this macro is to calculate the length (size) of the byte aligned to the integer byte length for a given variable or type N. int occupies 4 bytes in 32-bit systems and 16-bit systems account for 2 bytes.An expression(sizeof (n) + sizeof (int)-1)The effect
#001: myproj.exe! Wwinmaincrtstartup () line 414 C
#000: kernel32.dll! _ Baseprocessstart @ 4 () + 0x23 bytes
We can see that the process first calls the baseprocessstart function in kernel32.dll, then calls the startup code function wwinmaincrtstartup, then calls the _ tmaincrtstartup function, and finally calls our wwinmain function, our program is running.
Step 2: remove the breakpoint in step 1. at the entrance of the wndproc (ln101) function, run F5 to the next breakpoint and view
the MAC address, but this version does not work for me.
Method 3: Obtain the MAC address through SendARP.
The Code is as follows:
[Csharp]Using System;Using System. Collections. Generic;Using System. ComponentModel;Using System. Data;Using System. Drawing;Using System. Text;Using System. Windows. Forms;Using System. Collections;Using System. Diagnostics;Using System. Runtime. InteropServices;Using System. IO;Using System. Security. Cryptography;Using System. Net;Namespace WirelessRouteSystem{Cl
function, Finally, we call our wWinMain function, and our program is up and running.The second step, remove the breakpoint at the first step, at the WndProc (Ln101) function at the entrance of the next breakpoint, F5 continue to run, run to the new breakpoint, view the CallStack window, you can have the following results:#008: myproj.exe! WndProc (hwnd__ * hwnd=0x00050860, unsigned int message=0x00000101, unsigned int wparam=0x00000074, long lparam=
, and then calls the _tmaincrtstartup function, Finally, we call our wWinMain function, and our program is up and running.The second step, remove the breakpoint at the first step, at the WndProc (Ln101) function at the entrance of the next breakpoint, F5 continue to run, run to the new breakpoint, view the CallStack window, you can have the following results:#008: myproj.exe! WndProc (hwnd__ * hwnd=0x00050860, unsigned int message=0x00000101, unsigned
Bit operations are often encountered in driver development, especially in the 0 and 1 positions. You can change the number of bits you specify, and you cannot change the value of other bits. You also need to write your code efficiently. This is a very important skill. There are several symbols in the bitwise operation: | Bitwise OR Bitwise AND ^ XOR ~ bitwise NON1#include 2 3 intMain ()4 {5 intA =0x1101;6 intb =0x1011;7 intc =9;8printf"A | b is%x\n", a |b);9printf"A B is%x\n", A
Running a program in pocketpc often causes the program to die due to some unknown factors. however, there is no job manager on pocketpc like windows. if this problem occurs, either wait for half a day or restart it. the following is a piece of software restart code. you can use it directly after reading it.
Using system;
Using system. Collections. Generic;
Using system. text;
Using system. runtime. interopservices;
Namespace resetpocketpc
{
Class resetpocketpc
{
Public const uint file_device_hal
, maybe this method can get the MAC address, but this version does not work for me.
Method 3: Obtain the MAC address through SendARP.The Code is as follows:Copy codeThe Code is as follows: using System;Using System. Collections. Generic;Using System. ComponentModel;Using System. Data;Using System. Drawing;Using System. Text;Using System. Windows. Forms;Using System. Collections;Using System. Diagnostics;Using System. Runtime. InteropServices;Using System. IO;Using System. Security. Cryptography;
Address: http://blog.sina.com.cn/s/blog_6215c3760100fc2s.html
Kerneliocontrol is an undisclosed function. Therefore, we need to declare that many undisclosed methods are used in the following example. Therefore, we need to declare them before use: # define ctl_code (devicetype, function, method, access) (devicetype) # Define file_device_hal 0x00000101# Define method_buffered 0# Define file_any_access 0# DefineIoctl_hal_rebootCtl_code (file_device_hal,
report false positives. The following rules are more detailed to reduce false positives.1. Filtering of user requests to server resources and resource response packetsBecause the IP address of the thunder server is easy to replace, we recommend that you filter the DV:Protocol: TCPSource Port/destination port: 3076Four starting Bytes: 0x290000002. Filtering of resource information interaction packets between usersUDP protocolPort 3076First four bytes 0x320000003. Filtering of file transmission (
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.